<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>Strobe Media Playback</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <meta name="author" content="mangui">
        <meta name="description" content="HLS Plugin for OSMF - Strobe Media Playback sample page">
        <meta name="keywords" content="hls, osmf, m3u8, http live streaming, open source media framework, strobe media player, strobe media playback, strobemediaplayer, strobemediaplayback, apple hls, plugin, h264, H.264, x264, aac, mp3, flash, flashplayer, flash player, video, audio, mbr, multibitrate, multi bitrate, vod, video on demand, live, live stream, dvr, dvr stream, digital video recorder">
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-52843650-1', 'auto');
  ga('send', 'pageview');

</script>
</head>
<body>
<script type="text/javascript" src="../libs/swfobject.js"></script>
<script type="text/javascript" src="../libs/ParsedQueryString.js"></script>
<script type="text/javascript">
var player = null;

function loadStream(url) {
  player.setMediaResourceURL(url);
}

function getlink(url) {
  return "StrobeMediaPlayback.html?src=" + encodeURIComponent(url);
}

function listStreams(list, container) {
  for(var i=0; i<list.length; i++) { var entry = document.createElement("li");
    //entry.innerHTML = "<a href=" + getlink(list[i].file) + ">" +list[i].title+"</a>";
    entry.innerHTML = "<a href='#' onclick='return loadStream(\""+list[i].file+"\")'>"+list[i].title+"</a>";
    document.getElementById(container).appendChild(entry);
  }
  //loadStream(list[0].file);
}


        function jsbridge(playerId, event, data) {
          if (player == null) {
            player = document.getElementById(playerId);
          }
          switch(event) {
            case "onJavaScriptBridgeCreated":
              listStreams(teststreams,"streamlist");
              break;
             case "timeChange":
             case "timeupdate":
             case "progress":
               break;
             default:
              console.log(event, data);
            }
        }

            // Collect query parameters in an object that we can
            // forward to SWFObject:

            var pqs = new ParsedQueryString();
            var parameterNames = pqs.params(false);
            var parameters = {
                src: "http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8",
                //src: "http://localhost:8082/playlists/test_001/stream.m3u8",
                autoPlay: "false",
                verbose: true,
                controlBarAutoHide: "true",
                controlBarPosition: "bottom",
                poster: "images/poster.png",
                javascriptCallbackFunction: "jsbridge",
                plugin_hls: "../../bin/debug/flashlsOSMF.swf",
                hls_minbufferlength: -1,
                hls_maxbufferlength: 30,
                hls_lowbufferlength: 3,
                hls_seekmode: "KEYFRAME",
                hls_startfromlevel: -1,
                hls_seekfromlevel: -1,
                hls_live_flushurlcache: false,
                hls_info: true,
                hls_debug: false,
                hls_debug2: false,
                hls_warn: true,
                hls_error: true,
                hls_fragmentloadmaxretry : -1,
                hls_manifestloadmaxretry : -1,
                hls_capleveltostage : false,
                hls_maxlevelcappingmode : "downscale"
            };

            for (var i = 0; i < parameterNames.length; i++) {
                var parameterName = parameterNames[i];
                parameters[parameterName] = pqs.param(parameterName) ||
                parameters[parameterName];
            }

            var wmodeValue = "direct";
            var wmodeOptions = ["direct", "opaque", "transparent", "window"];
            if (parameters.hasOwnProperty("wmode"))
            {
                if (wmodeOptions.indexOf(parameters.wmode) >= 0)
                {
                    wmodeValue = parameters.wmode;
                }
                delete parameters.wmode;
            }

            // Embed the player SWF:
            swfobject.embedSWF(
                "StrobeMediaPlayback.swf"
                , "StrobeMediaPlayback"
                , 640
                , 480
                , "10.1.0"
                , "expressInstall.swf"
                , parameters
                , {
                    allowFullScreen: "true",
                    wmode: wmodeValue
                }
                , {
                    name: "StrobeMediaPlayback"
                }
            );

        </script>
        <div id="customButtons"></div>
        <table width="100%" border="0" cellspacing="5">
            <tr>
                <td width="43">
                    <img src="images/adobe-lq.png" alt="" width="43" height="72" />
                </td>
                <td width="320" class="Verdana">
                    Strobe Media Playback
                </td>
                <td width="262">
                    <img src="images/osmf_horizontal_red.png" width="262" height="57" alt="osmf logo"/>
                </td>
                <td width="*">
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="5">
            <tr>
                <td>
                    <div id="StrobeMediaPlayback">
                        <p>
                            Alternative content
                        </p>
                    </div>
                </td>
            </tr>
        </table>
Check with your own Playlist ! <a href="http://kb2.adobe.com/cps/142/tn_14213.html">beware of Cross Domain Policy</a><br>
<input id="userInput" value="http://184.72.239.149/vod/smil:BigBuckBunny.smil/playlist.m3u8" size="80"> <button onclick="userSubmit()">Play</button><br>
<p>
<script type="text/javascript" src="../../../playlists/streams.js"></script>
<script type="text/javascript" src="../../../streams.js"></script>
<script type="text/javascript">
function userSubmit() {
  window.location = getlink(document.getElementById('userInput').value);
}
</script>
<div> The following videos should stream correctly. Each time an
issue is reported with a sample playlist, it will be added in the list
and verified after bugfixing </div>
<ul id="streamlist"></ul>
    </body>
</html>
